home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * ListItem.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
- if (!IS.isModuleInitialized("IS.NOF.ListItem"))
- {
- /****h* NOF_JavaScript_Library/NOF.ListItem
- *
- * NAME
- * NOF.ListItem
- *
- * DESCRIPTION
- *
- * External dependencies: none
- ****/
-
- /**
- * Constructor
- * @param label
- * @param values
- **/
- function NOF_ListItem(label, values){
- this.__proto__ = NOF_ListItem.prototype;
-
- this.label = label;
- this.values = values;
-
- }
- {
- var method = NOF_ListItem.prototype;
-
- method.equals = function (listItem){
- return (this.label == listItem.label);
- }
-
- method.setValues = function (vals){
- for(var i=0; i<vals.length; i++){
- if(vals[i]!=null)
- this.values[i] = vals[i];
- }
- }
-
- method.toString = function (){
- return this.label+"__"+this.values.join("__");
- }
-
- method.setValueAtIndex = function (index, value) {
- this.values[index] = value;
- }
-
- }
-
- NOF.__proto__.ListItem = NOF_ListItem;
-
- }